<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
            box-sizing: border-box; 
   
        }
         header{
            top: 0;
            width: 100%;
            height: 2.5rem;
            background-color: aqua;
        }
        p{
            font-size: 22px;
        }
        main{
            width: 100%;
            height: 100rem;
        }
        html,body{
            width: 100%;
            height: 100%;
        }
        .slider{
            width: 100%;
            height: 10rem;
            background-color: pink;
        }
        nav{
            width: 100%;
            height: 6rem;
            background-color: skyblue;
        }
        .recommed{
            width: 100%;
            height:100%;
            background-color: yellow;
        }
        footer{
            width: 100%;
            height: 2.5rem;
            background-color: red;
            bottom: 0;
        }
        header,footer{
            position: fixed;
            left: 0;
            z-index: 999999;
        }
        
    </style>
</head>
<body>
    <header>  <p>顾瑞祥</p>  </header>
    <main>
        <div class="slider">
        
        </div>
        <nav></nav>
        <div class="recommed"></div>
    </main>
    <footer></footer>
    <script src="setHtmlWidth.js"></script>
    <script>
        console.log(window.innerWidth)
    </script>
</body>
</html>